package com.syh.jn.scm.service.api.downstream.purchase;

import cn.redscarf.commons.wrapper.Wrapper;
import com.syh.jn.scm.dto.downstream.purchase.*;
import com.syh.jn.scm.dto.support.FilesDto;
import com.syh.jn.scm.service.core.BaseService;

import java.util.List;

/**
 * Date:2018/7/9
 * Author:Clown
 * Desc;
 */

public interface DownPurchaseOrderService extends BaseService<DownPurchaseOrderSto, DownPurchaseOrderMto, DownPurchaseOrderVo, Long> {

  /**
   * 根据商品id查询订单项
   *
   * @param goodsId
   * @return
   */
  DownPurchaseOrderItemVo getByGoodsId(Long goodsId, Long id);

  /**
   * 上传单据图片
   *
   * @param dto
   */
  public void upload(FilesDto dto);

  /**
   * 取消采购单
   *
   * @param id
   */
  public void cancel(Long id);

  DonwPurchaseStatisticalAmountVo statisticalAmount(Wrapper we);

  List<DonwPurchaseStatisticalAmountVo> statisticalAmountByMerchant(Wrapper we);

  List<DonwPurchaseStatisticalAmountVo> statisticalAmountByGoods(Wrapper we);
}
